package com.forsythia.sns.to;

import java.util.Date;

import com.forsythia.sns.DateUtils;

public abstract class BaseTO extends com.ivy1107.commons.to.BaseTO {
    private Date createdDate;
    private Date updatedDate;
    private int version;

    public BaseTO() {
        createdDate = new Date();
    }

    public Date getCreatedDate() {
        return this.createdDate;
    }

    public void setCreatedDate(Date createdDate) {
        this.createdDate = createdDate;
    }

    public Date getUpdatedDate() {
        return this.updatedDate;
    }

    public void setUpdatedDate(Date updatedDate) {
        this.updatedDate = updatedDate;
    }

    public String getCreatedDateAsDuration() {
        return DateUtils.toDurationString(createdDate);
    }

    public String getUpdatedDateAsDuration() {
        return DateUtils.toDurationString(updatedDate);
    }

    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }
}
